package com.yuhang.jweb.vo;

import java.io.Serializable;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

public class UserVo implements Serializable {
	private static final long serialVersionUID = 8867424145879938745L;

	@NotNull(message = "id不能为空")
	private Long id;

	@NotEmpty(message = "姓名不能为空")
	@Length(min = 5, max = 20, message = "姓名长度在5-20")
	@Pattern(regexp = "[a-zA-Z]{5,20}", message = "姓名长度在5-20")
	private String name;

	@NotNull(message = "密码不能为空")
	@Length(min = 6, max = 20, message = "密码在6-20")
	private String password;
}
